﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://wubiyu.cnblogs.com">
<head>
      <title></title>
      <link href="../../Theme/DomExtGray/gray.min.css" rel="Stylesheet" type="text/css" />
      <link href="PageModel.css" rel="Stylesheet" type="text/css" />
      <script type="text/javascript" src="../../domExt.min.js"></script>
      <style type="text/css">

 p.MsoNormal
	{margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Calibri","sans-serif";
	          margin-left: 0cm;
              margin-right: 0cm;
              margin-top: 0cm;
          }
      </style>
</head>
<body>
      <div class="fun_title">
            _h.Store
      </div>
      <div class="fun_content">
            描述：本地存储组件<br />
       </div>
      <div class="fun_title2">
            方法:
      </div>
      <div class="fun_content2">
           get(key)：根据key获取值,返回值.<br />
           set(key,val)：设置值<br />
           remove(key)：删除一个项<br />       
      </div>
      <div class="fun_title2">
            示例:
      </div>
      <div class="code">
            <p align="left" class="MsoNormal" style="text-align:left;mso-layout-grid-align:
none;text-autospace:none">
                <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">script</span><span 
                    lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt"> <span style="color:red">type</span><span 
                    style="color:blue">=&quot;text/javascript&quot;&gt;</span><o:p></o:p></span></p>
            <p align="left" class="MsoNormal" style="text-align:left;text-indent:21.0pt;
mso-layout-grid-align:none;text-autospace:none">
                <span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
color:blue;mso-font-kerning:0pt">function</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;
mso-font-kerning:0pt"> run_click() {<o:p></o:p></span></p>
            <p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:21.0pt;mso-layout-grid-align:none;text-autospace:none">
                <span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">_h.Store.set(<span style="color:maroon">&quot;key&quot;</span>,
                <span style="color:maroon">&quot;testValue&quot;</span>);<o:p></o:p></span></p>
            <p align="left" class="MsoNormal" style="margin-left:21.0pt;text-align:left;
text-indent:21.0pt;mso-layout-grid-align:none;text-autospace:none">
                <span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">alert(_h.Store.get(<span style="color:maroon">&quot;key&quot;</span>));<o:p></o:p></span></p>
            <p align="left" class="MsoNormal" style="text-align:left;mso-layout-grid-align:
none;text-autospace:none">
                <span lang="EN-US" 
                    style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;mso-font-kerning:0pt">
                <span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>}<o:p></o:p></span></p>
            <p align="left" class="MsoNormal" style="text-align:left;mso-layout-grid-align:
none;text-autospace:none">
                <span lang="EN-US" style="font-size:9.5pt;font-family:
&quot;Microsoft YaHei&quot;;mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:
0pt">&lt;/</span><span lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;
mso-bidi-font-family:&quot;Microsoft YaHei&quot;;color:maroon;mso-font-kerning:0pt">script</span><span 
                    lang="EN-US" style="font-size:9.5pt;font-family:&quot;Microsoft YaHei&quot;;mso-bidi-font-family:
&quot;Microsoft YaHei&quot;;color:blue;mso-font-kerning:0pt">&gt;<o:p></o:p></span></p>
      </div>
      <input type="hidden" value=" var div1 = _g('#div1');  var collObjects1=_g('div');var collObjects2=_g('.testclass',div1);alert(div1.innerHTML);"
            id="jscode">
      <br />
      <h:btn onclick="run_click();">执行脚本</h:btn>
      <div id="htmltemp" style="display:none;"></div>
      <script type="text/javascript">
            function run_click() {
                _h.Store.set("key", "testValue");
                alert(_h.Store.get("key"));
            }
      </script>
</body>
</html>
